package com.nbjtjc.safe.activiti.mapper;

import com.nbjtjc.safe.activiti.model.ExtActNode;
import com.nbjtjc.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ExtActNodeMapper extends MyMapper<ExtActNode> {

    @Select("select * from ext_act_node where procdef_id=#{procdefId} and node_id=#{nodeId}")
    ExtActNode findByProcdefIdAndNodeId(@Param("procdefId") String procdefId, @Param("nodeId") String nodeId);

    @Select("select node_id,name,procdef_id from ext_act_node where " +
            " procdef_id in (${procDefIds})")
    List<ExtActNode> findByProcdefIds(@Param("procDefIds")List<String> procDefIds);
}